/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-04-24
 * Time:10:08
 */
public class TestDemo3 {
    public static void main(String[] args) {
        int num=0;
        int a=0;
        int b=0;
        int c=0;
        for (int i = 100; i < 999; i++) {
            a=i%10;
            b=i/10%10;
            c=i/100;
            num=a*a*a+b*b*b+c*c*c;
            if(i==num){
                System.out.println(i+"是水仙花数");
            }
        }
    }
}
